package com.yunsc.product.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @version: 1.0
 * @Author: adan
 * @description:
 * @date: 2024-04-15 21:15
 */
@Data
public class SpecDataDTO implements Serializable  {
    @JsonProperty("specList")
    private List<SpecList> specList;
    @JsonProperty("skuList")
    private List<SkuList> skuList;

    @Data
    public static class SpecList implements Serializable {
        private Integer key;
        private Integer specId;
        private String specName;
        @JsonProperty("valueList")
        private List<ValueList> valueList;

        @Data
        public static class ValueList implements Serializable{
            private Integer key;
            @JsonProperty("groupKey")
            private Integer groupKey;
            private String specValue;
            private String specValueId;
        }
    }

    @Data
    public static class SkuList implements Serializable {
        private Integer imageId;
        private double goodsPrice;
        private double linePrice;
        private Integer stockNum;
        private double goodsWeight;
        private String goodsSkuNo;
        @JsonProperty("skuKey")
        private String skuKey;
        @JsonProperty("skuKeys")
        private List<SkuKeys> skuKeys;
        @JsonProperty("spec_value_0")
        private String specValue0;
        @JsonProperty("spec_value_1")
        private String specValue1;
        @JsonProperty("spec_value_2")
        private String specValue2;

        @Data
        public static class SkuKeys {
            @JsonProperty("groupKey")
            private Integer groupKey;
            @JsonProperty("valueKey")
            private Integer valueKey;
        }
    }
}
